@echo off

call attr.bat

call clear.bat

call vcvars32.bat

call cl.exe /nologo /MT /W3 /Od /TC /GF /Gz /Y- /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /c "LOAD.C" "MAIN.C" "MEMORY.C" "PARSE.C" "PROCESS.C" "UTIL.C"

call link.exe /INCREMENTAL:NO /MACHINE:X86 /NOLOGO /OPT:ICF /OPT:REF /OPT:NOWIN98 /RELEASE /ENTRY:start /OUT:tmp1.exe /SUBSYSTEM:CONSOLE /MERGE:.rdata=.text LOAD.obj MAIN.obj MEMORY.obj PARSE.obj PROCESS.obj UTIL.obj kernel32.lib

call tmp1.exe /output:"tmp2.exe" /format:"EXE" /entry:"_start" /base:400000 /memalign:1000 /filealign:200 /subsystem:console /linkerver:1.0 /osver:4.0 /imagever:1.0 /subsysver:4.0 LOAD.obj MAIN.obj MEMORY.obj PARSE.obj PROCESS.obj UTIL.obj %LIB%\kernel32.lib

call tmp2.exe /output:"linker.exe" /format:"EXE" /entry:"_start" /base:400000 /memalign:1000 /filealign:200 /subsystem:console /linkerver:1.0 /osver:4.0 /imagever:1.0 /subsysver:4.0 LOAD.obj MAIN.obj MEMORY.obj PARSE.obj PROCESS.obj UTIL.obj %LIB%\kernel32.lib

del /F /S /Q *.obj

pause
